home *** CD-ROM | disk | FTP | other *** search
/ PC Magazine Extra 1998 Summer: The Perfect PC / PC Magazine Extra - The Perfect PC - Summer 1998 Vol 6 #2.iso / dwzdika / 1508 / nuserial.bat < prev    next >
DOS Batch File  |  1979-12-31  |  940b  |  31 lines

  1. @ECHO OFF
  2. IF '%1'=='' GOTO Syn
  3. SET Opt=
  4. FOR %%v IN (a A a: A:) DO IF '%1'=='%%v' SET opt=0
  5. FOR %%v IN (b B b: B:) DO IF '%1'=='%%v' SET opt=1
  6. ::Use on hard disks disabled by default. 
  7. ::FOR %%v IN (c C c: C:) DO IF '%1'=='%%v' SET opt=2
  8. ::FOR %%v IN (d D d: D:) DO IF '%1'=='%%v' SET opt=3
  9. IF '%opt%'=='' GOTO Syn
  10.  
  11. ECHO L 0 %opt% 0 1 > t$e$m$p$
  12. ECHO E 26 29 %5 %4 %3 %2 >> t$e$m$p$
  13. ECHO w 0 %opt% 0 1 >> t$e$m$p$
  14. ECHO q >> t$e$m$p$
  15. DEBUG < t$e$m$p$ > nul
  16. DEL t$e$m$p$
  17. SET opt=
  18. FOR %%v IN (a b c d A B C D) DO IF '%1'=='%%v' SET opt=:
  19. ECHO Serial number changed for drive %1%opt%
  20. DIR %1%opt% | FIND "Serial Number is"
  21. SET opt=
  22. GOTO End
  23. :Syn
  24. ECHO Syntax: NUSERIAL d: xx xx xx xx
  25. ECHO   where d: is the drive to get a new serial number
  26. ECHO   and xx xx xx xx are the eight hexadecimal digits
  27. ECHO   ordered as desired i the serial number
  28. ECHO Example: NUSERIAL a: 12 34 AB CD yields serial number 1234-ABCD
  29. :End
  30.  
  31.